package webservice;

import interfaces.IWebService;

import java.util.ArrayList;

import org.apache.log4j.Logger;

public class MockupWebServiceClient {

	public static Logger logger = Logger.getLogger(MockupWebServiceClient.class);
	
//	@Override
	public ArrayList<String> getAvailableSellers(String service) {
		logger.info("Retrieving available sellers...");
		
		ArrayList<String> result = new ArrayList<String>();
		result.add("Seller1");
		result.add("Seller2");
		result.add("Seller3");
		return result;
	}

//	@Override
	public ArrayList<String> getAvailableBuyers(String service) {
		logger.info("Retrieving available buyers...");
		
		ArrayList<String> result = new ArrayList<String>();
		result.add("Buyer1");
		result.add("Buyer2");
		result.add("Buyer3");
		return result;

	}
	
	public void refuseOffer(String user, String servName, String seller) {
		// TO DO: Write in DB
		logger.info(user + " refused offer for " + servName + " from " + seller);
	}
	
	
	public void acceptOffer(String user, String servName, String seller) {
		// TO DO: Write in DB
		logger.info(user + " accepted offer for " + servName + " from " + seller);
	}

	public void makeOffer(String username, String service, String buyer) {
		// TODO Auto-generated method stub
		logger.info(username + " made an offer for " + service + " to " + buyer);
		
		
	}

	public void dropOffer(String username, String service, String buyer) {
		// TODO Auto-generated method stub
		System.out.println(username + " dropped an offer for " + service + " to " + buyer);
		
	}
	
	// Login
	public boolean loghin(String username , String pass){
		return true;
	}
	
	// Logout:
	public void logout(String username){
		
	}
	
	
}
